package qq2564874169.tuaotuao.fx;

import java.util.Objects;

public class Tuple3<T1, T2, T3> {
    public T1 v1;
    public T2 v2;
    public T3 v3;

    public Tuple3() {

    }

    public Tuple3(T1 value1, T2 value2, T3 value3) {
        this.v1 = value1;
        this.v2 = value2;
        this.v3 = value3;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Tuple3<?, ?, ?> tuple3 = (Tuple3<?, ?, ?>) o;

        if (!Objects.equals(v1, tuple3.v1)) return false;
        if (!Objects.equals(v2, tuple3.v2)) return false;
        return Objects.equals(v3, tuple3.v3);
    }

    @Override
    public int hashCode() {
        int result = v1 != null ? v1.hashCode() : 0;
        result = 31 * result + (v2 != null ? v2.hashCode() : 0);
        result = 31 * result + (v3 != null ? v3.hashCode() : 0);
        return result;
    }
}
